Open Bug 1953499 Opened 3 months ago Updated 3 months ago

Add a rule to prevent references to browser/ code in toolkit/ CSS code

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(Not tracked)

People

(Reporter: hjones, Unassigned)

References

(Blocks 1 open bug)

Details

In the Firefox codebase browser code can depend on toolkit code, but toolkit code should never depend on browser code since toolkit code can be used in other applications/contexts where browser code is not necessarily available. We have a no-browser-refs-in-toolkit ESLint rule that flags attempted usage of browser code in toolkit in our JS code. We should add an analogous rule to stylelint-plugin-mozilla, especially since this has recently slipped through the cracks on a review and caused a backout in bug 1942373.

This seems to have been done (partially?) in bug 1698112.

See Also: → 1698112

Hey Itiel - that's a good find thanks for the heads up. That test is useful, but likely won't get run by folks for a lot of style changes which could result in backouts. I think a Stylelint rule might be nicer as it'll flag the issue at the time of commit/on Phabricator during code review.

You need to log in before you can comment on or make changes to this bug.